<?php
/**
 * Description of G_Odbc
 *
 * @author Monk <eoe2005@gmail.com>
 */
class G_Odbc extends GC_Db
{
    protected $_odbc;
    private $_res;
    public function __construct() {
        $this->_odbc = odbc_connect($dsn, $user, $password);
    }
    public function affectedRows() {
        
    }

    public function begin() {
        return odbc_autocommit($this->_odbc,FALSE);
    }

    public function commit() {
        $rs = odbc_commit($this->_odbc);
        odbc_autocommit($this->_odbc,true);
        return $rs;
    }

    public function escape($str) {
        
    }

    public function exec($sql) {
        $this->_res = $this->query($sql);
        return $this->_res;
    }

    public function getLastId() {
        
    }

    public function getResults($sql) {
        
    }

    public function getRow($sql) {
        
    }

    public function getVar($sql) {
        
    }

    public function query($sql) {
        return odbc_exec($this->_odbc, $sql);
    }

    public function rollback() {
        $rs = odbc_rollback($this->_odbc);
        odbc_autocommit($this->_odbc,true);
        return $rs;
    }    
}
